// 实现new过程 第一种（需要参数）
function NewOperator(ClassFun, ...args) {
    var obj = {};
    obj.__proto__ = ClassFun.prototype;
    var result = ClassFun.apply(obj, args)
    return result instanceof Object ? result : obj
}

// 实现new过程 第二种
function NewObj(){
    var obj = {};
    var constructor = [].shift.call(arguments)
    obj.__proto__ = constructor.prototype;
    constructor.apply(obj,arguments)
    return obj;
}

function Person(name){
    this.name = name
}

var a = NewObj(Person,'33')
console.log(a.name)